﻿@{
    Layout = null;


    System.Data.DataTable showData = ViewData["showData"] == null ? new System.Data.DataTable() : ViewData["showData"] as System.Data.DataTable;
}
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
    <title>JSummarySheet</title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
<script type="text/javascript">


    var pre;
    function selectArow(sObject) {
        $(sObject).attr("style", "BACKGROUND-COLOR: #e0f2ff");
        if (pre != null && pre != sObject) {
            $(pre).attr("style", "BACKGROUND-COLOR: white");
        }
        pre = sObject;
    }

    $(document).ready(function () {
        $("#toolMenu").smartFloat();
        
        })
        </script>
    <style>
        .tableStyle
        {
            width: 100%;
            border: solid 1px black;
            padding: 6px 5px;
            border-collapse: collapse;
        }
        .tableStyle td
        {
        }
        
        .tableStyle .tdClass
        {
            padding: 0px;
            padding: 6px 5px;
            border: solid 1px black;
            white-space: nowrap;
        }
        .tableStyle th
        {
            text-align: right;
            padding: 6px 5px;
            border: solid 1px black;
        }
        .tableStyle .button
        {
            margin: 2px 0px 0px 2px;
            float: left;
        }
        
        text
        {
            border: 1px solid #aecaf0;
        }
    </style>
</head>
<body>
 @using (Html.BeginForm("QueryTBSummarySheet", "QueryTB", FormMethod.Post, new { id = "form1" }))
 {
    <table width="1300" style="margin-right: auto; margin-left: auto">
        <tr>
            <td align="center">
                <h1>
                    @ViewData["year"]年 @ViewData["mon"]月份大榭开发区重点税源企业税收收入情况表
                </h1>
            </td>
        </tr>
        <tr>
        <td align="center">
    制表日期：@DateTime.Now.ToString("yyyy年MM月dd日")
    </td>
            <td align="right">
                单位：万元
            </td>
        </tr>
    </table>
    <table class="tableStyle">
        <tr onclick="selectArow(this)">
            <td rowspan="3" class="tdClass" align="center">
                序号
            </td>
            <td rowspan="3" class="tdClass" align="center">
                企业名称
            </td>
            <td colspan="6" class="tdClass" align="center">
                合计
            </td>
            <td colspan="6" class="tdClass" align="center">
                增值税
            </td>
            <td colspan="6" class="tdClass" align="center">
                消费税
            </td>
            <td colspan="6" class="tdClass" align="center">
                营业税
            </td>
            <td colspan="6" class="tdClass" align="center">
                企业所得税
            </td>
            <td colspan="6" class="tdClass" align="center">
                个人所得税
            </td>
            <td colspan="6" class="tdClass" align="center">
                其他税收
            </td>
        </tr>
        <tr onclick="selectArow(this)">
             <td colspan="2" class="tdClass" align="center">
                @ViewData["year"]
            </td>
            <td colspan="2" class="tdClass" align="center">@ViewData["foreyear"]
            </td>
            <td colspan="2" class="tdClass" align="center" >
                同比增减
            </td>
            <td colspan="2" class="tdClass" align="center">
                @ViewData["year"]
            </td>
            <td colspan="2" class="tdClass" align="center">@ViewData["foreyear"]
            </td>
            <td colspan="2" class="tdClass" align="center" >
                同比增减
            </td>
            <td colspan="2" class="tdClass" align="center">
                @ViewData["year"]
            </td>
            <td colspan="2" class="tdClass" align="center">@ViewData["foreyear"]
            </td>
            <td colspan="2" class="tdClass" align="center" >
                同比增减
            </td>
            <td colspan="2" class="tdClass" align="center">
                @ViewData["year"]
            </td>
            <td colspan="2" class="tdClass" align="center">@ViewData["foreyear"]
            </td>
            <td colspan="2" class="tdClass" align="center">
                同比增减
            </td>
            <td colspan="2" class="tdClass" align="center">
                @ViewData["year"]
            </td>
            <td colspan="2" class="tdClass" align="center">@ViewData["foreyear"]
            </td>
            <td colspan="2" class="tdClass" align="center">
                同比增减
            </td>
            <td colspan="2" class="tdClass" align="center">
                @ViewData["year"]
            </td>
            <td colspan="2" class="tdClass" align="center">@ViewData["foreyear"]
            </td>
            <td colspan="2" class="tdClass" align="center" >
                同比增减
            </td>
            <td colspan="2" class="tdClass" align="center">
                @ViewData["year"]
            </td>
            <td colspan="2" class="tdClass" align="center">@ViewData["foreyear"]
            </td>
            <td colspan="2" class="tdClass" align="center">
                同比增减
            </td>
        </tr>
         <tr onclick="selectArow(this)">
         <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center" >
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center" >1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center" >
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center" >1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center" >
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center" >1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center" >
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center" >1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center" >
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center" >1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center" >
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center" >1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center">1-@ViewData["mon"]月
            </td>
             <td colspan="1" class="tdClass" align="center" >
                @ViewData["mon"]月
            </td>
            <td colspan="1" class="tdClass" align="center" >1-@ViewData["mon"]月
            </td>
        </tr>
       
            @for (int i = 0; i < showData.Rows.Count; i++)
            { 
                <tr onclick="selectArow(this)">
                    @if (showData.Rows[i]["NSRMC"] == "合计")
                    { 
                   
                        <td colspan="2" class="tdClass" align="center">
                            合计
                        </td>
                        foreach (System.Data.DataColumn dc in showData.Columns)
                        {
                            if (showData.Rows[i][dc.ColumnName] != "合计")
                            {
                                if (!string.IsNullOrEmpty(showData.Rows[i][dc.ColumnName].ToString()))
                                {
                        <td class="tdClass" align="right">@showData.Rows[i][dc.ColumnName]
                        </td> 
                                }
                                else
                                {
                        <td class="tdClass" align="right">
                        </td> 
                                }
                            }

                        }

                    }
                    else
                    { 
                        <td class="tdClass" align="right">@(i + 1)
                        </td> 
                        foreach (System.Data.DataColumn dc in showData.Columns)
                        {
                            if (!string.IsNullOrEmpty(showData.Rows[i][dc.ColumnName].ToString()))
                            {
                                if (showData.Rows[i][dc.ColumnName].ToString().Contains("-") & dc.ColumnName.Contains("tb"))
                                {
                        @*<td class="tdClass" align="right" style="color: #FF0000">@("(" + showData.Rows[i][dc.ColumnName].ToString().Substring(1) + ")")
                        </td>*@
                        <td class="tdClass" align="right">@showData.Rows[i][dc.ColumnName]
                        </td>
                                }
                                else
                                {
                        <td class="tdClass" align="right">@showData.Rows[i][dc.ColumnName]
                        </td>
                                }
                            }
                            else
                            {
                        <td class="tdClass" align="right" >
                        </td> 
                            }
                        }
                    }
                </tr>
            }
       
    </table>
    <table width="100%">
        <tr onclick="selectArow(this)">
            <td align="left">
                注：大榭石化数据为企业缴纳数，增值税（含成品油划中央库3.6％部分），其他税收（城建税含成品油划中央库6.9%部分）。
            </td>
        </tr>
    </table>
 }
      <script>
          lp.Hide();
    </script>
</body>
</html>
